<template>
    <div class="content-box">
        <div class="page-wrap">
            <mt-tab-container v-model="selected">
                <!-- 用户模块 -->
                <mt-tab-container-item id="my_index">
                    <user-index></user-index>
                </mt-tab-container-item>

                <!--  -->
                <mt-tab-container-item id="wallet_index">
                    <test-item title="我是第一个item" isLink to='/sb'>
                        <span slot="left-icon" class="item-l-img pr-iconfont icon-cart"></span>
                    </test-item>
                    <test-item title="我是第二个item"></test-item>
                </mt-tab-container-item>

                <!-- 主页 -->
                <mt-tab-container-item id="index">
                    <div>{{ v_m }}</div>
                    <test-2 v-model="v_m" @click.native="mytest" v-bind:countSb.sync="countSp">
                    </test-2>
                </mt-tab-container-item>
            </mt-tab-container>
        </div>

        <mt-tabbar v-model="selected">
            <mt-tab-item id="index">
                <span class="pr-iconfont icon-smile" slot="icon"></span> 首页
            </mt-tab-item>

            <mt-tab-item id="wallet_index">
                <span class="pr-iconfont icon-cart" slot="icon"></span> 钱包
            </mt-tab-item>

            <mt-tab-item id="my_index">
                <span class="pr-iconfont icon-accountfilling" slot="icon"></span> 我的
            </mt-tab-item>
        </mt-tabbar>
    </div>
</template>

<script>
    import User from './User.vue';
    import Test from '../components/test_v-model.vue';
    import Test2 from '../components/test_v-model_2.vue';

    export default {
        name: 'df-index',
        data() {
            return {
                selected: 'my_index',
                test: 'sb',
                countSp : 0,
                v_m : 111
            }
        },
        components: {
            'user-index': User,
            'test-item' : Test,
            'test-2' : Test2    
        },
        methods: {
            mytest: function() {
                
            }
        }
    }
</script>

<style lang="scss">
   @import '../sass/index.scss';
</style>